<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link rel="icon" type="image/png" href="/image/favicon.png">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Register Page</title>
    <style>
        /* 全局样式 */
        body, html {
            margin: 0;
            padding: 0;
            height: 100%;
            font-family: 'Arial', sans-serif;
            background: linear-gradient(135deg, #6a11cb, #2575fc);
            color: white;
            display: flex;
            justify-content: center;
            align-items: center;
            overflow: hidden;
        }

        /* 注册容器 */
        .register-container {
            background: rgba(255, 255, 255, 0.1);
            padding: 40px;
            border-radius: 15px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
            backdrop-filter: blur(10px);
            text-align: center;
            width: 300px;
            animation: fadeIn 1s ease-in-out;
        }

        /* 标题样式 */
        h1 {
            font-size: 2.5em;
            margin-bottom: 20px;
            color: white;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
        }

        /* 输入框样式 */
        input[type="text"], input[type="password"], input[type="email"] {
            width: 100%;
            padding: 12px;
            margin: 10px 0;
            border: none;
            border-radius: 5px;
            background: rgba(255, 255, 255, 0.2);
            color: white;
            font-size: 1em;
            outline: none;
        }

        input[type="text"]::placeholder, input[type="password"]::placeholder, input[type="email"]::placeholder {
            color: rgba(255, 255, 255, 0.7);
        }

        /* 按钮样式 */
        button {
            width: 100%;
            padding: 12px;
            margin: 20px 0;
            border: none;
            border-radius: 5px;
            background: #2575fc;
            color: white;
            font-size: 1em;
            cursor: pointer;
            transition: background 0.3s ease;
        }

        button:hover {
            background: #6a11cb;
        }

        /* 链接样式 */
        a {
            color: white; /* 统一为白色 */
            text-decoration: none;
            font-size: 0.9em;
            transition: opacity 0.3s ease;
        }

        a:hover {
            opacity: 0.8; /* 鼠标悬停时降低透明度 */
        }

        /* 动画效果 */
        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(-20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* 背景动画 */
        body::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 10%, transparent 10.01%);
            background-size: 20px 20px;
            animation: moveBackground 10s linear infinite;
            z-index: -1;
        }

        @keyframes moveBackground {
            from {
                transform: translate(0, 0);
            }
            to {
                transform: translate(20px, 20px);
            }
        }

        /* 手机端适配 */
        @media (max-width: 768px) {
            .register-container {
                width: 90%; /* 手机端宽度增加 */
                padding: 20px; /* 减少内边距 */
            }

            h1 {
                font-size: 2em; /* 标题字体缩小 */
            }

            input[type="text"], input[type="password"], input[type="email"] {
                font-size: 0.9em; /* 输入框字体缩小 */
            }

            button {
                font-size: 0.9em; /* 按钮字体缩小 */
            }

            a {
                font-size: 0.8em; /* 链接字体缩小 */
            }
        }

        /* 超小屏幕适配（如竖屏手机） */
        @media (max-width: 480px) {
            h1 {
                font-size: 1.8em; /* 进一步缩小标题字体 */
            }

            input[type="text"], input[type="password"], input[type="email"] {
                font-size: 0.8em; /* 进一步缩小输入框字体 */
            }

            button {
                font-size: 0.8em; /* 进一步缩小按钮字体 */
            }

            a {
                font-size: 0.75em; /* 进一步缩小链接字体 */
            }
        }
    </style>
</head>
<body>
    <div class="register-container">
        <h1>Register</h1>
        <!-- 使用form提交数据 -->
        <form id="login-form" action="/register" method="POST">
            <input type="text" id="username" name="username" placeholder="Username" required>
            <input type="email" id="email" name="email" placeholder="Email" required>
            <input type="password" id="password" name="password" placeholder="Password" required>
            <input type="password" id="confirm-password" name="confirm-password" placeholder="Confirm Password" required>
            <button type="submit">Register</button>
        </form>
        <p>Already have an account? <a href="log.html" id="login-link">Login here</a></p>
        <p><a href="index.html" id="home-link">Back to Home</a></p>
    </div>
</body>
</html>